package org.ihelpuoo.weboo.upload;

import org.ihelpuoo.lang.StringUtils;
import org.ihelpuoo.orm.IIIException;
import org.ihelpuoo.orm.filter.SQLFilter;

public class DeleteFileBeanFilter extends SQLFilter
{

	private static final long	serialVersionUID	= -1869301787673992819L;

	private String				ids;

	public String getIds()
	{
		return ids;
	}

	public void setIds(String ids)
	{
		this.ids = ids;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (!super.equals(obj))
			return false;
		if (!ids.equals(((DeleteFileBeanFilter)obj).ids))
			return false;
		return true;
	}

	@Override
	public CharSequence getConditionString() throws IIIException
	{
		if (StringUtils.isBlank(ids))
			return "id<0";
		return "id IN (" + ids + ")";
	}

}
